//
//  XMQHttpFileUploader.h
//  XiaoMiQuan
//
//  Created by liaowei on 14-4-18.
//
//

#import <Foundation/Foundation.h>
#import "XMQHttpTransfer.h"


@protocol XMQHttpFileDownloaderDelegate;

@interface XMQHttpFileDownloader : XMQFileTansferRequest<XMQHttpFileTransferDelegate>

@property (assign, nonatomic) id<XMQHttpFileDownloaderDelegate> downloadDelegate;

@end


@protocol XMQHttpFileDownloaderDelegate <NSObject>

@optional

- (void)httpDownloadBegin:(NSNumber *)requestId userObj:(id)userObj
                                  expectedContentLength:(long long)expectedContentLength;

- (void)httpDownloadDidRecvData:(NSNumber *)requestId userObj:(id)userObj
                     recvLength:(long long)recvLength
                    totalLength:(long long)totalLength;

- (void)httpDownloadFailWithError:(NSNumber *)requestId userObj:(id)userObj error:(NSError *)error;

- (void)httpDownloadEnd:(NSNumber *)requestId userObj:(id)userObj;

@end
